/*
** launcher.c for launcher.c in /home/vermel/local/epitech/tek2/c/ftrace/pullup-project
** 
** Made by nathan vermelle
** Login   <vermel_n@epitech.net>
** 
** Started on  Fri Jun 29 14:07:12 2012 nathan vermelle
** Last update Fri Jun 29 15:47:13 2012 nathan vermelle
*/

#include "./../includes/ftrace.h"

void	launch_ftrace(char *command)
{
   pid_t	pid;

   if ((pid = fork()) == -1)
      merror("fork failed");
   if (pid == 0)
      runChildProc(pid, command);
   else
   {
      catchSignal(pid);
      runFatherProc(pid);
   }
}

void	launch_ftracePid(pid_t pid)
{
   if (pid == 0)
      runChildProcPid(pid);
   else
   {
      catchSignal(pid);
      runFatherProc(pid);
   }
}
